﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CrossLayerCommunication.FluentValidation;

namespace UnitTest.FluentValidation
{
    [TestClass]
    public class TestCustom
    {
        [TestMethod]
        public void TestCustomValidationLogic()
        {
            StringBuilder value = new StringBuilder("TestingFluentvalidation");

            Assert.IsTrue(value.TestingFluentValidation().CustomValidation(item => item.Length > 10).ValidationWasSuccessful);
            Assert.IsFalse(value.TestingFluentValidation().CustomValidation(item => item.Length > 100).ValidationWasSuccessful);
        }        
    }
}
